package org.jeecg.common.constant;

public interface CommonConstant {

	/**
	 * 正常状态
	 */
    public static final Integer STATUS_NORMAL = 0;

	/**
	 * 禁用状态
	 */
    public static final Integer STATUS_DISABLE = -1;

	/**
	 * 删除标志
	 */
    public static final Integer DEL_FLAG_1 = 1;

	/**
	 * 未删除
	 */
    public static final Integer DEL_FLAG_0 = 0;

	/**
	 * 系统日志类型： 登录
	 */
    public static final int LOG_TYPE_1 = 1;

	/**
	 * 系统日志类型： 操作
	 */
    public static final int LOG_TYPE_2 = 2;
	
	
	/** {@code 500 Server Error} (HTTP/1.0 - RFC 1945) */
    public static final Integer SC_INTERNAL_SERVER_ERROR_500 = 500;
    /** {@code 200 OK} (HTTP/1.0 - RFC 1945) */
    public static final Integer SC_OK_200 = 200;
    /**访问权限认证未通过 510*/
    public static final Integer SC_JEECG_NO_AUTHZ=510;
   /**未开通账号*/
   public static final Integer SC_JEECG_NO_AVAILABLE=520;

   /**
    * 默认成功消息
    */
   String DEFAULT_SUCCESS_MESSAGE = "操作成功";
   /**
    * 默认失败消息
    */
   String DEFAULT_FAILURE_MESSAGE = "操作失败";


    /** 登录用户拥有角色缓存KEY前缀 */
    public static String LOGIN_USER_CACHERULES_ROLE = "loginUser_cacheRules::Roles_";
    /** 登录用户拥有权限缓存KEY前缀 */
    public static String LOGIN_USER_CACHERULES_PERMISSION  = "loginUser_cacheRules::Permissions_";
    /** 登录用户令牌缓存KEY前缀 */
    public static final int  TOKEN_EXPIRE_TIME  = 3600; //3600秒即是一小时

    public static final String PREFIX_USER_TOKEN  = "PREFIX_USER_TOKEN_:";

    //车禁商户登录token
    public static final String PREFIX_MERCHANT_TOKEN  = "PREFIX_MERCHANT_TOKEN:";

    public static final String LOCK_MERCHANT_ORDER = "LOCK_MERCHANT_ORDER:";

    //车禁临停优惠券锁
    public static final String LOCK_CAR_TEMP_DERATE = "LOCK_CAR_TEMP_DERATE:";
    
    /**
     *  0：一级菜单
     */
    public static final Integer MENU_TYPE_0  = 0;
   /**
    *  1：子菜单 
    */
    public static final Integer MENU_TYPE_1  = 1;
    /**
     *  2：按钮权限
     */
    public static final Integer MENU_TYPE_2  = 2;
    
    /**通告对象类型（USER:指定用户，ALL:全体用户）*/
    public static final String MSG_TYPE_UESR  = "USER";
    public static final String MSG_TYPE_ALL  = "ALL";
    
    /**发布状态（0未发布，1已发布，2已撤销）*/
    public static final String NO_SEND  = "0";
    public static final String HAS_SEND  = "1";
    public static final String HAS_CANCLE  = "2";
    
    /**阅读状态（0未读，1已读）*/
    public static final String HAS_READ_FLAG  = "1";
    public static final String NO_READ_FLAG  = "0";
    
    /**优先级（L低，M中，H高）*/
    public static final String PRIORITY_L  = "L";
    public static final String PRIORITY_M  = "M ";
    public static final String PRIORITY_H  = "H";

    /**部门属性（company:公司，department:部门,office 管理处）*/
    public static final String DEPART_PROPERTY_CHANNEL  = "channel"; //渠道
    public static final String DEPART_PROPERTY_COMPANY  = "company"; //公司
    public static final String DEPART_PROPERTY_DEPARTMENT  = "department"; //部门
    public static final String DEPART_PROPERTY_OFFICE = "office"; //管理处
    public static final String DEPART_PROPERTY_PROJECT = "project";  //小区/项目
    public static final String DEPART_PROPERTY_FLOOR = "floor";  //楼栋

    /** 查询规则 */
    public static final String DEPART_WHERE_CO = "co";
    public static final String DEPART_WHERE_O = "o";



    /**事件预警等级*/
    public static final Integer EVENT_WARNING_NORMAL = 0; //正常级
    public static final Integer EVENT_WARNING_MIN = 10; //轻度预警
    public static final Integer EVENT_WARNING_MIDDLE = 20; //中度预警
    public static final Integer EVENT_WARNING_MAX = 30; //重度预警

    /**设备使用状态 0:正常*/
    public static final String EQUIP_STATUS_NORMAL = "0";  //正常状态


    /**
     * 短信模板方式  0 .登录模板、1.注册模板、2.忘记密码模板
     */
    public static final String SMS_TPL_TYPE_0  = "0";
    public static final String SMS_TPL_TYPE_1  = "1";
    public static final String SMS_TPL_TYPE_2  = "2";

    /**
     * 状态(0无效1有效)
     */
    public static final String STATUS_0 = "0";
    public static final String STATUS_1 = "1";

    /**
     * 同一账户多处登录（1：  允许   0：禁止）
     */
    public static final Integer REPEAT_LOGIN_NO = 0;
    public static final Integer REPEAT_LOGIN_OK = 1;

    /**
     * 消息类型1:通知公告2:系统消息
     */
    public static final String MSG_CATEGORY_1 = "1";
    public static final String MSG_CATEGORY_2 = "2";

    /**
     * 是否配置菜单的数据权限 1是0否
     */
    public static final Integer RULE_FLAG_0 = 0;
    public static final Integer RULE_FLAG_1 = 1;

    /**
     * 是否用户已被冻结 1(解冻)正常 2冻结 3未开通
     */
    public static final Integer USER_UNFREEZE = 1;
    public static final Integer USER_FREEZE = 2;
    public static final int USER_NO_AVAILABLE = 3;


    /**字典翻译文本后缀*/
    public static final String DICT_TEXT_SUFFIX = "_dictText";

    /**事件触发比较规则*/
    public static final Integer COMPARE_TYPE_EQUAL = 0;
    public static final Integer COMPARE_TYPE_GREATER = 1;
    public static final Integer COMPARE_TYPE_LESS = 2;
    public static final Integer COMPARE_TYPE_BETWEEN =3;

    /** 线程一次性批量处理数 */
    public static final Integer BATCH_SIZE = 1000;

    /** 云梯维小保接口配置信息 */
    public static final String YUN_TI_TOKEN = "YUN_TI_TOKEN";
    public static final String YUN_TI_BASEURL = "https://zlopen.yun-ti.com";
    public static final String YUN_TI_APPKEY = "eGxsMTMyNTdnbXY5cXpZTHI5NWhOWjJB";
    public static final String YUN_TI_APPSECRET = "ZUd4c01UTXlOVGRuYlhZNWNYcFpUSEk1";

    /** 第三方数据同步最后一次的时间（后面会跟上每个供应商的编码，此为前缀） */
    public static final String SYNC_LAST_TIME = "SYNC_LAST_TIME:";

    static final String SOCKET_EVENT_INFO = "equipEventInfo";

    /** 系统自动触发时的供应商id */
    static final String COLLECTOR_SYSTEM_ID = "14e8509ccd7e11e9a9d800163e1a654b";


    /** 事件处理状态 */
    public static final Integer EVENT_PROCESS_STATUS_NONE = 0; //无需处理
    public static final Integer EVENT_PROCESS_STATUS_WAIT = 10; //待处理
    public static final Integer EVENT_PROCESS_STATUS_FINISH = 20; //已处理

    /** 事件是否需要处理 */
    public static final Integer EVENT_NEED_PROCESS = 1; //需处理

    static final String RDS_REPORT = "report_";

    /**小区概况*/
    static final String REPORT_TYPE_1 = "小区概况";
    /**智能设备*/
    static final String REPORT_TYPE_2 = "智能设备";

    /** 系统采集项编号 */
    public static final String EQUIP_COLLECT_ITEM_0029 = "0029";//门禁状态
    public static final String EQUIP_COLLECT_ITEM_0025 = "0025";//阀门状态
    public static final String EQUIP_COLLECT_ITEM_0024 = "0024";//井盖状态


    /** 物管中心相关配置 */
    public static final String LING_THING_BASEURL = "http://47.103.68.198:27334/linkthing/dms/uniondup"; //物管中心token
    public static final String LING_THING_TOKEN = "LING_THING_TOKEN"; //物管中心token
    public static final String LING_THING_APP_KEY = "0E697254418F4F538E7152239DC295A0"; //物管中心appkey
    public static final String LING_THING_SECRET_KEY = "CAB34850470E45CEA3DAB882B9AEDC59"; //物管中心secretkey
    public static final String LING_THING_CODE = "WGZX";//物管中心
    public static final String LING_THING_DEFAULT_TYPE = "00000";//未匹配到类型时默认的类型字符串
    public static final Integer LING_THING_QUERY_ALL_SIZE = 3;
    public static final String LING_THING_TYPE_00003 = "00003";
    public static final String LING_THING_TYPE_00004 = "00004";
    public static final String LING_THING_TYPE_00005 = "00005";
    public static final String LING_THING_TYPE_00006 = "00006";
    public static final String LING_THING_TYPE_00007 = "00007";

    public static final Integer EVENT_TRIGGER_NONE = 0; //不触发事件
    public static final Integer EVENT_TRIGGER_TRUE = 1; //触发事件

    /**发送方式：1短信 2邮件 3微信 4站内推送*/
    public static final Integer SMS_TYPE_1 = 1;
    public static final Integer SMS_TYPE_2 = 2;
    public static final Integer SMS_TYPE_3 = 3;
    public static final Integer SMS_TYPE_4 = 4;

    public static final String ADMIN = "01"; //超级管理员id -- 固定  TODO(临时性)
    public static final String SYSTEM = "system"; //S端超级管理员

    /** 巡检状态 **/
    public static final Integer INSPECTION_STATUS_300 = 300;
    public static final Integer INSPECTION_STATUS_500 = 500;

    /** 留言类型 **/
    public static final String TOPIC_TYPE_REPORT_DAY = "JG001";
    public static final String TOPIC_TYPE_REPORT_WEEK = "JG002";

    // 极光推送
    public static String APP_KEY = "e04096c2def738e7803fab1e";
    public static String MASTER_SECRET = "899fded95c7583354b5c013f";




    /** 天波人脸识别平台接口地址 **/
    public static String TELPOFACE_BASE_URL = "http://localhost:8080/";
    /** 查询设备列表 **/
    public static String TELPOFACE_GETDEVICEINFO = "Face/getDeviceInfo";
    /** 添加/修改人员接口 **/
    public static String TELPOFACE_DOWNUSER = "Face/downUser";
    /** 发送控制指令接口 **/
    public static String TELPOFACE_SENDCONTROL = "Face/sendControl";

    final static String CHARGE_METHOD_FIELD_NAME_PREFIX = "fieldName";



   /**
    * Redis地址连接前缀 - 分布式锁使用
    */
   String REDIS_CONNECTION_PREFIX = "redis://";

   /**客户端标识*/
   final static String CLIENT_PC_B = "pc_b";
   final static String CLIENT_PC_S = "pc_s";
}
